Sure, we see multi-peak (double-hump) infections at the national or state level, but do they happen in small geographic regions? It’s possible that after the first wave, people have some herd immunity and improve their safety practices to prevent a second wave. County level data helps us answer this– still not as granular as I’d like but better than state level data.
## ── Attaching packages ──────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✔ ggplot2 3.2.1 ✔ purrr 0.3.3
## ✔ tibble 2.1.3 ✔ dplyr 0.8.5
## ✔ tidyr 1.0.2 ✔ stringr 1.4.0
## ✔ readr 1.3.1 ✔ forcats 0.5.0
## ── Conflicts ─────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
##
## Attaching package: 'scales'
## The following object is masked from 'package:purrr':
##
## discard
## The following object is masked from 'package:readr':
##
## col_factor
covidByCounty <- loadCovidDataByGeo("US_COUNTY")
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at 0.29831
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 0.30375
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 0.090619
Counties that ever hit 1,000 new cases per day.
steepIncrease <- covidByCounty %>% dplyr::filter(newCasesPerDay > 1000) %>% dplyr::filter(state != "_ALL_")
steepIncreaseNames <- unique(steepIncrease$state)
steepIncreaseNames
## [1] "Alabama: Mobile" "Alabama: Tuscaloosa"
## [3] "Arizona: Maricopa" "California: Kern"
## [5] "California: Los Angeles" "California: Orange"
## [7] "California: Riverside" "California: San Bernardino"
## [9] "California: San Diego" "Colorado: El Paso"
## [11] "Connecticut: Fairfield" "Florida: Broward"
## [13] "Florida: Hillsborough" "Florida: Lee"
## [15] "Florida: Miami-Dade" "Florida: Orange"
## [17] "Florida: Palm Beach" "Georgia: Cobb"
## [19] "Georgia: Fulton" "Georgia: Gwinnett"
## [21] "Georgia: Unknown" "Illinois: Cook"
## [23] "Illinois: DuPage" "Illinois: Kane"
## [25] "Illinois: Lake" "Illinois: Unknown"
## [27] "Indiana: Marion" "Kansas: Johnson"
## [29] "Kansas: Sedgwick" "Louisiana: Unknown"
## [31] "Michigan: Oakland" "Michigan: Wayne"
## [33] "Minnesota: Hennepin" "Nevada: Clark"
## [35] "New York: Nassau" "New York: New York City"
## [37] "New York: Suffolk" "New York: Westchester"
## [39] "Ohio: Hamilton" "Oklahoma: Oklahoma"
## [41] "Pennsylvania: Philadelphia" "Puerto Rico: Unknown"
## [43] "Rhode Island: Providence" "Rhode Island: Unknown"
## [45] "South Carolina: Aiken" "Texas: Anderson"
## [47] "Texas: Bexar" "Texas: Cameron"
## [49] "Texas: Collin" "Texas: Dallas"
## [51] "Texas: Denton" "Texas: El Paso"
## [53] "Texas: Guadalupe" "Texas: Harris"
## [55] "Texas: Hidalgo" "Texas: Nueces"
## [57] "Texas: Potter" "Texas: Tarrant"
## [59] "Texas: Williamson" "Utah: Salt Lake"
## [61] "Utah: Utah" "Wisconsin: Milwaukee"
plotData <- covidByCounty %>%
dplyr::filter(state %in% steepIncreaseNames)
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = state),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in steep increase counties') +
facet_wrap(~ state) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="New York")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in New York counties') +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="New Jersey")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = paste('Trajectory of COVID-19 cases in', 'New Jersey', 'counties')) +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="Ohio")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = paste('Trajectory of COVID-19 cases in', 'Ohio', 'counties')) +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="Michigan")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in Michigan counties') +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="Illinois")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in Illinois counties') +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="California")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 100000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in California counties') +
facet_wrap(~ county) +
theme_minimal()
plotData <- covidByCounty %>%
dplyr::filter(us_state=="Louisiana")
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 10000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in Louisiana counties') +
facet_wrap(~ county) +
theme_minimal()
No protests against lockdown in Tennessee but I am curious how it looks. I removed Bledsoe county because it seems to have a data error (100 million new cases on one day).
plotData <- covidByCounty %>%
dplyr::filter(us_state=="Tennessee") %>% filter(! (county %in% c("Bledsoe", "Trousdale")))
ggplot(plotData, aes(x=cases, y=smoothed, group = state)) +
geom_line(data = plotData %>% rename(group = county),
aes(x = cases, y = smoothed, group = group), color = "grey") +
geom_line(aes(y = smoothed), color = "black") +
scale_x_log10(label = comma, breaks = c(100, 1000, 10000)) +
scale_y_log10(label = comma) +
coord_equal() +
labs(x = 'Total confirmed cases',
y = 'New confirmed cases per day',
title = 'Trajectory of COVID-19 cases in Tennessee counties') +
facet_wrap(~ county) +
theme_minimal()